<template>
	<view class="myPlanContainer">
		<!-- 我的测评报告 -->
		<view class="testReport">
			<image src="https://app.zbzedu.com/static/WaChat/images/testReport.png" mode="widthFix" style="width: 662rpx;"></image>
			<button class="reportBtn u-font-36 btn font-b" @click="jump"
				:class="{'disabled': disabled}">{{btnString || '去登录'}}</button>
		</view>
		<view class="testReport">
			<image src="https://app.zbzedu.com/static/WaChat/images/globalJob.png" mode="widthFix" style="width: 662rpx;"></image>
			<button class="reportBtn u-font-36 btn font-b" @click="jump"
				:class="{'disabled': disabled}">{{btnString || '去登录'}}</button>
		</view>
		<!-- 选科要求 -->
		<view class="chooseImg">
			<image :src="xuankeImg" mode="widthFix" style="height: 280rpx; margin-bottom: 20rpx;width: 662rpx;"></image>
			<image :src="moniImg" mode="widthFix" style="height: 280rpx;width: 662rpx;"></image>
		</view>
	</view>
</template>

<script>
	import {
		getBackUrl
	} from '../../../util/api'
	export default {
		props: {
			xuankeImg:String,
			moniImg:String,
			btnString: String,
			url: String,
			disabled: {
				type: Boolean,
				default () {
					return false
				}
			}

		},
		data(){
			return{
				backImg:{
					color:"red"
				}
			}
		},
		onLoad() {
		},
		methods: {
			jump() {
				if (this.disabled) {
					return
				}
				if (this.url) {
					this.$u.route({
						url: this.url.includes('wx_login') ? this.url + `?backUrl=${ getBackUrl() }` : this.url,
						type: this.url.includes('wx_login') ? 'reLaunch' : 'navigateTo'
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.myPlanContainer {
		.testReport {
			position: relative;
			margin: 40rpx 0;
			text-align: center;
			.reportBtn {
				position: absolute;
				margin: auto;
				top: 0;
				left: 0;
				right: 0;
				bottom: 0;
				background-color: #2A6CAC;
				color: #FFFFFF;
				border-radius: 46rpx;
				width: 258rpx;
				height: 92rpx;
				line-height: 92rpx;
			}
		}
	}

	.chooseImg{
		width: 100%;
		margin: 0 44rpx;
	}
	.disabled {
	  background: rgba(200, 200, 200, 100);
	}
</style>
